/* $Header: sequence.c,v 2.2 01/10/02 10:28:20 przybyls Exp $ */

/***********************************************************************/
/*                                                                     */
/*                  Copyright Hewlett-Packard Co. 1991                 */
/*                                                                     */
/***********************************************************************/

/***********************************************************************/
/* MODULE NAME:  sequence.c                                            */
/* ============                                                        */
/*                                                                     */
/* Author:  Tom Przybylski                                             */
/*                                                                     */
/* MODULE PURPOSE:                                                     */
/*                                                                     */
/*                                                                     */
/*                                                                     */
/*                                                                     */
/***********************************************************************/


/*****************************/
/*   GLOBAL INCLUDE FILES    */
/*****************************/

#include <typedefs.h>
#include <error.h>
#include <sequence.h>

/*****************************/
/*   LOCAL INCLUDE FILES     */
/*****************************/


/*****************************/
/*   GLOBAL VARIABLES        */
/*****************************/

#pragma  SECTION UDATA=pfail

   SEQ_STATE    Seq_State;
   SEQ_SUBSTATE Seq_Substate;
   BIT8         Priority_In_Progress;
   BIT8         Load_Post_Seq_Method;
   BIT8         Overlap_Seq;

   INT16        Front_Sample;
   INT16        Back_Sample;
   INT16        Front_Sample_Inj;     /* Set by Start run */
   INT16        Back_Sample_Inj;      /* Set by Start run */

   SEQ_CTRL     Seq_Current;     /* Current seq step */
   SEQ_CTRL     Seq_Last;        /* Last seq step. */
   SEQ_CTRL     Seq_Hold;        /* Last seq step before priority */

   SEQUENCE     Active_Seq;


/* Stored_Seq[0] is the "check area" used in sequence loading.   */
/* Stored_Seq[1] ... [n] are used for storage.                   */

   SEQUENCE     Stored_Seq[MAX_SEQ+1];

#pragma  SECTION UNDO

   RESOURCE  Seq_Resource;
   SEQ_CTRL  Seq_Next;
   UI_ERR    Seq_Parm_Err;
   INT8      Seq_Parm;
   BIT8      Return_Bottles;
   BIT8      First_Priority_Sample;
   U_INT8    Seq_Left;               /* for listings */
   U_INT8    Seq_Right;              /* for listings */
   U_INT16   Seq_Line;               /* for listings */

   BIT8      Start_Has_Occurred;     /* Ensures seq sees start run */
   BIT8      Injection_Complete;     /* For APG cable detection    */

   U_INT8         Gsv_Inj_1;
   U_INT8         Gsv_Inj_2;
   GSV_INJ_STATE  Gsv_Inj_State;
